package com.moody.hibernate.domain;

/**
 * RatioValueId entity. @author MyEclipse Persistence Tools
 */

public class RatioValueId implements java.io.Serializable {

	// Fields

	private String serialNo;
	private String modelId;
	private String reportItemNo;

	// Constructors

	/** default constructor */
	public RatioValueId() {
	}

	/** full constructor */
	public RatioValueId(String serialNo, String modelId, String reportItemNo) {
		this.serialNo = serialNo;
		this.modelId = modelId;
		this.reportItemNo = reportItemNo;
	}

	// Property accessors

	public String getSerialNo() {
		return this.serialNo;
	}

	public void setSerialNo(String serialNo) {
		this.serialNo = serialNo;
	}

	public String getModelId() {
		return this.modelId;
	}

	public void setModelId(String modelId) {
		this.modelId = modelId;
	}

	public String getReportItemNo() {
		return this.reportItemNo;
	}

	public void setReportItemNo(String reportItemNo) {
		this.reportItemNo = reportItemNo;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof RatioValueId))
			return false;
		RatioValueId castOther = (RatioValueId) other;

		return ((this.getSerialNo() == castOther.getSerialNo()) || (this
				.getSerialNo() != null
				&& castOther.getSerialNo() != null && this.getSerialNo()
				.equals(castOther.getSerialNo())))
				&& ((this.getModelId() == castOther.getModelId()) || (this
						.getModelId() != null
						&& castOther.getModelId() != null && this.getModelId()
						.equals(castOther.getModelId())))
				&& ((this.getReportItemNo() == castOther.getReportItemNo()) || (this
						.getReportItemNo() != null
						&& castOther.getReportItemNo() != null && this
						.getReportItemNo().equals(castOther.getReportItemNo())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSerialNo() == null ? 0 : this.getSerialNo().hashCode());
		result = 37 * result
				+ (getModelId() == null ? 0 : this.getModelId().hashCode());
		result = 37
				* result
				+ (getReportItemNo() == null ? 0 : this.getReportItemNo()
						.hashCode());
		return result;
	}

}